﻿<?php
function randomString($iLen) {
$arAlpha = str_split("abcdefghijklmnopqrstuvwxyz");
$arNumeric = str_split("1234567890");
$sOut = "";
for ($I = 0; $I < $iLen; $I++) {
if (rand(0, 1) == 0) {
if (rand(0, 1) == 0) {
$sOut .= $arAlpha[array_rand($arAlpha)];
} else {
$sOut .= strtoupper($arAlpha[array_rand($arAlpha)]);
}
} else {
$sOut .= $arNumeric[array_rand($arNumeric)];
}
}//end of looping
return $sOut;
}//end of randomString function
?>
